﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DAO
{
    public static class MonAnDAO
    {
        public static bool insertMonAn(MONAN monan)
        {
            try
            {
                QL_HuongRungEntities db = new QL_HuongRungEntities();
                MONAN temp = db.MONAN.Find(monan.MaMonAn);
                if (temp == null)
                {
                    db.MONAN.Add(monan);
                    db.SaveChanges();
                }
                return true;
            }
            catch (Exception ex)
            {
                return false;
            }
        }
    }
}
